<?php

class PartialViewController extends Controller {
	public function actionGet() {
		if(!isset($_REQUEST['service'])) die(0);
		$service = $_REQUEST['service'];
		unset($_REQUEST['service']);
		$filename = Yii::getPathOfAlias('application.services.data.'.$service).'.php';
		if(!file_exists($filename)) {
			die(0);
		}
		$config = $this->getConfig($filename, $_REQUEST);
		$this->widget('lib.ext.data.DataWidget', $config);
	}
	
	public function getConfig($_filename_, $_params_) {
		extract($_params_);
		return include $_filename_;
	}
}

?>